package com.aks.server.en;

/**
 * 活动状态枚举
 */
public enum ActivityStatusEnum {
    PENDING_PAYMENT("0", "待支付"),
    PAID("1", "已支付"),
    TESTED("2", "已测试"),
    STARTED("3", "已开始"),
    COMPLETED("4", "已完成");

    private final String code;
    private final String description;

    ActivityStatusEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    /**
     * 根据状态码获取枚举值
     * @param code 状态码
     * @return 对应的枚举值，如果未找到返回null
     */
    public static ActivityStatusEnum getByCode(String code) {
        for (ActivityStatusEnum status : values()) {
            if (status.getCode().equals(code)) {
                return status;
            }
        }
        return null;
    }
} 